package com.whfc.mach.dto.iot;

/**
 * @Description:
 * @author: xugcheng
 * @version: 1.0
 * @date: 2019/7/16 20:24
 */
public class MsgConst {

    /**
     * 包头,开始标记
     */
    public static final int START_FLAG = 0x55AA;

    /**
     * 包固定部分的长度
     */
    public static final int FIXED_LENGTH = 11;

    public static final int GPS_FLAG_S_W = 0xF0;

    public static final int GPS_FLAG_S_E = 0xFF;

    public static final int GPS_FLAG_N_W = 0x00;

    public static final int GPS_FLAG_N_E = 0x0F;

    public static final String EAST = "E";

    public static final String WEST = "W";

    public static final String NORTH = "N";

    public static final String SOUTH = "S";


    /**
     * 响应:成功
     */
    public static final int ACK_SUCCESS = 1;

    /**
     * 响应:失败
     */
    public static final int ACK_FAIL = 2;

    /**
     * 主机
     */
    public static final int MASTER = 0x01;

    /**
     * 从机
     */
    public static final int SLAVE = 0x00;

    /**
     * 参数类型:倾角报警参数
     */
    public static final int PARAM_TYPE_ROTARY = 0x01;

    /**
     * 参数类型:连接服务器参数
     */
    public static final int PARAM_TYPE_SERVER = 0x02;

    /**
     * 报警类型:倾角报警
     */
    public static final int WARN_TYPE_ROTARY = 0x01;


    /**
     * 上行 - 机械数据传输指令
     */
    public static final int UPSTREAM_CMD_0x01 = 0x01;

    /**
     * 下行 - 通用数据传输确认
     */
    public static final int DOWNSTREAM_CMD_0x81 = 0x81;

    /**
     * 下行-硬件升级指令
     */
    public static final int DOWNSTREAM_CMD_0x82 = 0x82;

    /**
     * 上行-硬件升级确认指令
     */
    public static final int UPSTREAM_CMD_0x02 = 0x02;

    /**
     * 上行-硬件对时指令-请求
     */
    public static final int UPSTREAM_CMD_0x03 = 0x03;

    /**
     * 下行-硬件对时指令-响应
     */
    public static final int DOWNSTREAM_CMD_0x83 = 0x83;

    /**
     * 上行-硬件定位设备数据指令-请求
     */
    public static final int UPSTREAM_CMD_0x04 = 0x04;

    /**
     * 下行-硬件定位设备数据指令-响应
     */
    public static final int DOWNSTREAM_CMD_0x84 = 0x84;

    /**
     * 上行-硬件OBD设备数据指令-请求
     */
    public static final int UPSTREAM_CMD_0x05 = 0x05;

    /**
     * 下行-硬件OBD设备数据指令-响应
     */
    public static final int DOWNSTREAM_CMD_0x85 = 0x85;

    /**
     * 上行-硬件冷藏车设备数据指令-请求
     */
    public static final int UPSTREAM_CMD_0x06 = 0x06;

    /**
     * 下行-硬件冷藏车设备数据指令-响应
     */
    public static final int DOWNSTREAM_CMD_0x86 = 0x86;

    /**
     * 上行-硬件参数设置-响应
     */
    public static final int UPSTREAM_CMD_0x07 = 0x07;

    /**
     * 下行-硬件参数设置-请求
     */
    public static final int DOWNSTREAM_CMD_0x87 = 0x87;

    /**
     * 上行-硬件报警-请求
     */
    public static final int UPSTREAM_CMD_0x08 = 0x08;

    /**
     * 下行-硬件报警-响应
     */
    public static final int DOWNSTREAM_CMD_0x88 = 0x88;
}
